home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Extras / BOOPSI / GI1 / Doc / calendar_gc.doc < prev    next >
Encoding:
Text File  |  1994-03-11  |  11.1 KB  |  309 lines

  1. TABLE OF CONTENTS
  2.  
  3. calendar.gadget/--datasheet--
  4. calendar.gadget/GM_DOMAIN
  5. calendar.gadget/GM_GOACTIVE
  6. calendar.gadget/GM_GOINACTIVE
  7. calendar.gadget/GM_HANDLEINPUT
  8. calendar.gadget/GM_HITTEST
  9. calendar.gadget/GM_LAYOUT
  10. calendar.gadget/GM_RENDER
  11. calendar.gadget/OM_DISPOSE
  12. calendar.gadget/OM_NEW
  13. calendar.gadget/OM_SET
  14. calendar.gadget/--datasheet--                   calendar.gadget/--datasheet--
  15.  
  16.      NAME
  17.         calendar.gadget--Monthly calendar gadget                (V42)
  18.  
  19.      SUPERCLASS
  20.         gadgetclass
  21.  
  22.      DESCRIPTION
  23.         The calendar gadget class is used to display a month-based array
  24.         of days in the visual style of traditional calendars.
  25.  
  26.      METHODS
  27.         OM_NEW--Create the gadget.  Passed to superclass, then OM_SET.
  28.  
  29.         OM_SET--Set object attributes.  Passed to superclass first.
  30.  
  31.         OM_UPDATE--Set object notification attributes.  Passed to superclass
  32.             first.
  33.  
  34.         GM_LAYOUT--Calculate relative gadget coordinates.  Passed to
  35.             superclass first.  Requires V39 or beyond of Intuition.
  36.  
  37.         GM_RENDER--Renders the gadget imagry.  Overrides the superclass.
  38.  
  39.         GM_HITTEST--Determines if mouse is within the gadget rectangle.
  40.             Overrides the superclass.
  41.  
  42.         GM_GOACTIVE--Handles activation, mutual-exclusion and date-select.
  43.             Overrides the superclass.
  44.  
  45.         GM_HANDLEINPUT--Handles input events once active.  Handles cycle
  46.             buttons, repeat and RMB abort.  Overrides the superclass.
  47.  
  48.         GM_GOINACTIVE--Deselects the button.  Overrides the superclass.
  49.  
  50.         GM_DOMAIN--Obtain the minimum size of a calendar object.
  51.  
  52.         All other methods are passed to the superclass, including OM_DISPOSE.
  53.  
  54.      ATTRIBUTES
  55.         GA_Disabled (BOOL) -- Determines whether the calendar is disabled or
  56.             not.  Changing disable state will invoke GM_RENDER.  A disabled
  57.             calendar's border and label are all rendered in SHADOWPEN and then
  58.             dusted in a ghosting pattern that is rendered in SHADOWPEN.
  59.             Defaults to FALSE.
  60.  
  61.         GA_TextAttr (struct TextAttr *) -- Text attribute for the font to
  62.             use for the labels.
  63.  
  64.         GA_ReadOnly (BOOL) -- Indicate whether calendar has selectable days
  65.             or is for display only.  Defaults to FALSE (selectable days).
  66.  
  67.         CALENDAR_ClockData (struct ClockData *) -- Pointer to a ClockData
  68.             structure (defined in <utility/date.h>) used to set the current
  69.             date information, including month, day and year.
  70.  
  71.         CALENDAR_Day (LONG) -- Set the current day of the month.
  72.  
  73.         CALENDAR_FirstWeekday (LONG) -- Sets the first day of the week.
  74.             Defaults to 0, which is Sunday.
  75.  
  76.         CALENDAR_Days (STRPTR *) -- Array of localized column labels,
  77.             starting with Sunday as day[0].  English versions are built
  78.             in.
  79.  
  80.         CALENDAR_Labels (LONG) -- Optional array of day description
  81.             records.  This allows individual control over the appearance
  82.             of each day of the month.  Changing this attribute will
  83.             invoke GM_RENDER.  If provide, the array must contain 31
  84.             entries.
  85.  
  86.         CALENDAR_Label (BOOL) -- Indicate whether there should be a label
  87.             across the top showing the names of the days of the week.
  88.             Defaults to TRUE.
  89.  
  90.      NOTES
  91.         Relative support requires V39 and beyond of Intuition.
  92.  
  93. calendar.gadget/GM_DOMAIN                           calendar.gadget/GM_DOMAIN
  94.  
  95.      NAME
  96.         GM_DOMAIN--Obtain the domain of an object               (V42)
  97.  
  98.      FUNCTION
  99.         The GM_DOMAIN method is used to obtain the domain of a
  100.         calendar.gadget object before ever creating an object.
  101.  
  102.         Requires a RastPort pointer in gpd_RPort with the correct font
  103.         attributes.  Only supports the gpd_Which==GDOMAIN_MINIMUM type.
  104.  
  105.      ATTRIBUTES
  106.         The following attributes can be specified.
  107.  
  108.         CALENDAR_Days (STRPTR *) -- Array of localized column labels,
  109.             starting with Sunday as day[0].
  110.  
  111.         CALENDAR_Label (BOOL) -- Indicate whether there should be a label
  112.             across the top showing the names of the days of the week.
  113.             Defaults to TRUE.
  114.  
  115.      RESULT
  116.         Returns 1 and fills in the gpd_Domain field.
  117.  
  118. calendar.gadget/GM_GOACTIVE                       calendar.gadget/GM_GOACTIVE
  119.  
  120.      NAME
  121.         GM_GOACTIVE--Activate a gadget.                         (V42)
  122.  
  123.      FUNCTION
  124.         The GM_GOACTIVE method is used to indicate to a gadget that it has
  125.         become active.  This method overrides the superclass.
  126.  
  127.      RESULT
  128.         Returns GMR_MEACTIVE.
  129.  
  130.         Sets the *msg->gpi_Termination field to CALENDAR_Day, which in turn
  131.         fills in the IntuiMessage->Code field.
  132.  
  133. calendar.gadget/GM_GOINACTIVE                   calendar.gadget/GM_GOINACTIVE
  134.  
  135.      NAME
  136.         GM_GOINACTIVE--Gadget has lost activation.              (V42)
  137.  
  138.      FUNCTION
  139.         The GM_GOINACTIVE method is used to indicate that the calendar has
  140.         become inactive.  This method overrides the superclass.
  141.  
  142.      RESULT
  143.         This method returns 0.
  144.  
  145. calendar.gadget/GM_HANDLEINPUT                 calendar.gadget/GM_HANDLEINPUT
  146.  
  147.      NAME
  148.         GM_HANDLEINPUT--Handle input events.                    (V42)
  149.  
  150.      FUNCTION
  151.         The GM_HANDLEINPUT method is used to handle the input events of an
  152.         active calendar gadget.  This method overrides the superclass.
  153.  
  154.         This method correctly handles RMB abort.
  155.  
  156.         If CALENDAR_Multiselect was specified at creation time, then
  157.         a notification event is sent for each day selected.  The day is
  158.         sent in the CALENDAR_Day attribute.  0x100 is set if the day is
  159.         deselected.
  160.  
  161.      RESULT
  162.         This method returns GMR_MEACTIVE as long as the gadget is active.
  163.  
  164.         Sets the *msg->gpi_Termination field to CALENDAR_Day, which in turn
  165.         fills in the IntuiMessage->Code field.
  166.  
  167. calendar.gadget/GM_HITTEST                         calendar.gadget/GM_HITTEST
  168.  
  169.      NAME
  170.         GM_HITTEST--Is gadget hit.                              (V42)
  171.  
  172.      FUNCTION
  173.         The GM_HITTEST method is used to determine if the given mouse
  174.         coordinates are within the domain of a day within the calendar.  This
  175.         method overrides the superclass.
  176.  
  177.      RESULT
  178.         This method returns GMR_GADGETHIT if within the domain, otherwise
  179.         zero is returned.
  180.  
  181.         If the gadget is GA_ReadOnly, then zero is always returned.
  182.  
  183. calendar.gadget/GM_LAYOUT                           calendar.gadget/GM_LAYOUT
  184.  
  185.      NAME
  186.         GM_LAYOUT--Calculate relative gadget coordinates.       (V42)
  187.  
  188.      FUNCTION
  189.         The GM_LAYOUT method is used to calculate the domain of the calendar
  190.         and to layout the days of the month.  This method is passed to the
  191.         superclass first.
  192.  
  193.         Gadget relativity is fully supported.
  194.  
  195.      RESULT
  196.         This method returns 0.
  197.  
  198. calendar.gadget/GM_RENDER                           calendar.gadget/GM_RENDER
  199.  
  200.      NAME
  201.         GM_RENDER--Render the visuals of the calendar.          (V42)
  202.  
  203.      FUNCTION
  204.         The GM_RENDER method is used to render the visuals of the calendar.
  205.         This method overrides the superclass.
  206.  
  207.         If the calendar is disabled, then the ghosting pattern is applied.
  208.  
  209.      RESULT
  210.         This method returns 0.
  211.  
  212. calendar.gadget/OM_DISPOSE                         calendar.gadget/OM_DISPOSE
  213.  
  214.      NAME
  215.         OM_DISPOSE--Delete a calendar.gadget object.            (V42)
  216.  
  217.      FUNCTION
  218.         The OM_DISPOSE method is used to delete an instance of the
  219.         calendar.gadget class.  This method is pass to the superclass when
  220.         it has completed.
  221.  
  222.      RESULT
  223.         The object is deleted.  NULL is returned.
  224.  
  225. calendar.gadget/OM_NEW                                 calendar.gadget/OM_NEW
  226.  
  227.      NAME
  228.         OM_NEW--Create a calendar.gadget object.                (V42)
  229.  
  230.      FUNCTION
  231.         The OM_NEW method is used to create an instance of the calendar.gadget
  232.         class.  This method is passed to the superclass first.
  233.  
  234.      ATTRIBUTES
  235.         The following attributes can be specified at creation time.
  236.  
  237.         GA_Disabled (BOOL) -- Determines whether the calendar is disabled or
  238.             not.  Changing disable state will invoke GM_RENDER.  A disabled
  239.             calendar's border and label are all rendered in SHADOWPEN and then
  240.             dusted in a ghosting pattern that is rendered in SHADOWPEN.
  241.             Defaults to FALSE.
  242.  
  243.         GA_TextAttr (struct TextAttr *) -- Text attribute for the font to
  244.             use for the labels.
  245.  
  246.         GA_ReadOnly (BOOL) -- Indicate whether calendar has selectable days
  247.             or is for display only.  Defaults to FALSE (selectable days).
  248.  
  249.         CALENDAR_ClockData (struct ClockData *) -- Pointer to a ClockData
  250.             structure (defined in <utility/date.h>) used to set the current
  251.             date information, including month, day and year.
  252.  
  253.         CALENDAR_Day (LONG) -- Set the current day of the month.
  254.  
  255.         CALENDAR_FirstWeekday (LONG) -- Sets the first day of the week.
  256.             Defaults to 0, which is Sunday.
  257.  
  258.         CALENDAR_Days (STRPTR *) -- Array of localized column labels,
  259.             starting with Sunday as day[0].  English versions are built
  260.             in.
  261.  
  262.         CALENDAR_Label (BOOL) -- Indicate whether there should be a label
  263.             across the top showing the names of the days of the week.
  264.             Defaults to TRUE.
  265.  
  266.      RESULT
  267.         If the object was created then a pointer to the object is returned,
  268.         otherwise NULL is returned.
  269.  
  270. calendar.gadget/OM_SET                                 calendar.gadget/OM_SET
  271.  
  272.      NAME
  273.         OM_SET--Set the attributes of a calendar.gadget object. (V42)
  274.  
  275.      FUNCTION
  276.         The OM_SET method is used to set the attributes of a calendar.gadget.
  277.         This method is passed to the superclass first.
  278.  
  279.      ATTRIBUTES
  280.         The following attributes can be changed at OM_SET or OM_UPDATE.
  281.  
  282.         GA_Disabled (BOOL) -- Determines whether the calendar is disabled or
  283.             not.  Changing disable state will invoke GM_RENDER.  A disabled
  284.             calendar's border and label are all rendered in SHADOWPEN and then
  285.             dusted in a ghosting pattern that is rendered in SHADOWPEN.
  286.             Defaults to FALSE.  Changing the disable state will invoke
  287.             GM_RENDER.
  288.  
  289.         CALENDAR_ClockData (struct ClockData *) -- Pointer to a ClockData
  290.             structure (defined in <utility/date.h>) used to set the current
  291.             date information, including month, day and year.  Changing
  292.             the date information will invoke GM_LAYOUT and GM_RENDER.
  293.  
  294.         CALENDAR_Day (LONG) -- Set the current day of the month.  Changing
  295.             the day will invoke GM_RENDER.
  296.  
  297.         CALENDAR_Labels (LONG) -- Optional array of day description
  298.             records.  This allows individual control over the appearance
  299.             of each day of the month.  Changing this attribute will
  300.             invoke GM_RENDER.  If provide, the array must contain 31
  301.             entries.
  302.  
  303.      RESULT
  304.         The class will update the attributes of object.  Changing some
  305.         attributes will result in GM_LAYOUT and/or GM_RENDER being called.
  306.  
  307.         The return value will be non-zero if the gadget needs to be refreshed.
  308.  
  309.